package com.nit.store.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nit.store.pojo.dto.output.CartDto;
import com.nit.store.pojo.entity.Cart;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @Author J1ay
 * @Date 2022/7/21 20:04
 * @Description
 */
@Repository
public interface CartMapper extends BaseMapper<Cart> {

    /**
     * 根据用户id查看购物车信息
     * @param uid
     * @return
     */
    CartDto[] getCartListByUid(@Param("uid") long uid);

    /**
     * 根据购物车id查看信息
     * @param cids
     * @return
     */
    CartDto[] getCartByCid(@Param("cids") Long[] cids);
}
